package com.jy.oms.framework.asyn.task.model.strategy;


import com.jy.oms.framework.asyn.task.constants.TaskExecuteStrategyEnum;

/**
 * 任务执行策略对象
 *
 * @author liuquan
 */
public abstract class ExecuteStrategyObj {

    /**
     * 任务编码，自动注入
     */
    private String taskCode;

    /**
     * 组标识，自动注入
     */
    private TaskExecuteStrategyEnum taskExecuteStrategy;

    /**
     * 任务组核心线程数
     */
    private Integer taskGroupCoreThreadNum;

    /**
     * 任务DB队列名;
     * 任务队列数据库表为为sys_task_queue_[taskGroupDbQueueName]
     */
    private String taskGroupDbQueueName;

    public ExecuteStrategyObj(String taskCode, TaskExecuteStrategyEnum taskExecuteStrategy) {
        this.taskCode = taskCode;
        this.taskExecuteStrategy = taskExecuteStrategy;
    }

    public String getTaskCode() {
        return taskCode;
    }

    public TaskExecuteStrategyEnum getTaskExecuteStrategy() {
        return taskExecuteStrategy;
    }

    public Integer getTaskGroupCoreThreadNum() {
        return taskGroupCoreThreadNum;
    }

    public void setTaskGroupCoreThreadNum(Integer taskGroupCoreThreadNum) {
        this.taskGroupCoreThreadNum = taskGroupCoreThreadNum;
    }

    public String getTaskGroupDbQueueName() {
        return taskGroupDbQueueName;
    }

    public void setTaskGroupDbQueueName(String taskGroupDbQueueName) {
        this.taskGroupDbQueueName = taskGroupDbQueueName;
    }
}
